<%@ page contentType="text/html; charset=utf-8" %>
<%@ include file="/WEB-INF/jsp/includeTop.jsp" %>

<table width="100%" border="0" cellpadding="0" cellspacing="5">
  <tr>
    <td valign="top">
      <table class="dbborder" width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>
            <table width="100%" border="0" cellpadding="0" cellspacing="5">
              <tr>
                <td>
                  <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td class="dashTopLeft"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                      <td class="dashTop" width=100%><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                      <td class="dashTopRight"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                    </tr>
                    
                    <tr>
                      <td class="dashLeft"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                      <td align="center">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
						  <tr>
						     <td>
						     	
						     	<%@ include file="/WEB-INF/jsp/project/projectbrowserSearch.jsp" %>   
						     	
						     
						       	<table class="dbborder" width="100%" border="0" cellpadding="0" cellspacing="1">
									<tr class="rowHead">
										<td height="20" width="20" align="center"></td>
										<td height="20" nowrap align="center" class="globalTextBold">项目名称</td>
										<td height="20" nowrap align="center" class="globalTextBold">项目状态</td>
										<td height="20" nowrap align="center" class="globalTextBold">创建人</td>
										<td height="20" nowrap align="center" class="globalTextBold">开始-截止时间</td>
										<td height="20" nowrap align="center" class="globalTextBold">类型</td>
										<td height="20" nowrap align="center" class="globalTextBold">项目经理</td>
										<td height="20" nowrap align="center" class="globalTextBold">
<!-- 											操作 -->
										</td>
									</tr>
								
									<c:forEach var="project" items="${projectList}" varStatus="status">
										<tr class="rowClass">
											<td height="20" width="20" align="center">
												<input type="radio" name="projectId" value="${project.id}" projectCode="${project.code}" projectName="${project.name}" />
											</td>
											<td height="20" class="globalText">${project.name}</td>
											<td height="20" class="globalText">${project.status}</td>
											<td height="20" class="globalText"></td>
											<td height="20" class="globalText"> 
												<fmt:formatDate value="${project.startDate}" pattern="yyyy-MM-dd"/>
												~
												<fmt:formatDate value="${project.endDate}" pattern="yyyy-MM-dd"/>
											</td>
											<td height="20" class="globalText">${project.category.name}</td>
											<td height="20" class="globalText"></td>
											<td height="20" class="globalText">
<%-- 												<input type="button" class="btnStyle" value="编辑" onclick="javascript:window.location='<c:url value='/project/editProjectMain.html?projectId=${project.id}' />'"> --%>
<%-- 												<input type="button" class="btnStyle" value="删除" onclick="javascript:if(confirm('确认删除?'))window.location='<c:url value='/project/removeProject.html?projectId=${project.id}' />'"> --%>
											</td>
										</tr>
									</c:forEach>
								
								</table>
						     </td>
						   </tr>
                        </table><p/>
                      </td>
                      <td class="dashRight"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                    </tr>
                    <tr>
                      <td class="dashBottomLeft"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                      <td class="dashBottom" width=100%><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                      <td class="dashBottomRight"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

<div style="margin: 5px;">
	<input type="button" value="选择" onclick="chooseProject();" />
</div>
<script>
	function chooseProject(){
		var radio=$('input[@name="projectId"][checked]');
		parent.window.returnValue={projectId:radio.val(),projectName:radio.attr("projectName"),projectCode:radio.attr("projectCode")};
		window.close();
	}
</script>

										  
										  
										  
										  